﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Brain
{
    /// <summary>
    /// This class provides easy access to common devices's resolution
    /// </summary>
    public class Resolution
    {
        public int Width { get; set; }
        public int Height { get; set; }

        public Resolution(int Width, int Height)
        {
            this.Width = Width;
            this.Height = Height;
        }

        private static Resolution iPhoneNonRetina = new Resolution(480, 320);
        private static Resolution wp7 = new Resolution(800, 480);
        private static Resolution iphoneRetina = new Resolution(960, 640);
        private static Resolution iPadNonRetina = new Resolution(1024, 768);
        private static Resolution hd = new Resolution(1280, 720);
        private static Resolution fullHD = new Resolution(1920, 1080);
        private static Resolution ipadRetina = new Resolution(2048, 1536);

        public static Resolution CurrentResolution
        {
            get
            {
                Viewport viewport = Engine.Instance.GraphicsDevice.Viewport;
                return new Resolution(viewport.Width, viewport.Height);
            }
        }
        public static Resolution HD
        {
            get { return hd; }
        }
        public static Resolution FullHD
        {
            get { return fullHD; }
        }
        public static Resolution iPhoneNoRetina
        {
            get { return iPhoneNonRetina; }
        }
        public static Resolution iPhoneRetina
        {
            get { return iphoneRetina; }
        }
        public static Resolution WindowsPhone7
        {
            get { return wp7; }
        }
        public static Resolution iPadNoRetina
        {
            get { return iPadNonRetina; }
        }
        public static Resolution iPadRetina
        {
            get { return ipadRetina; }
        }
    }
}
